<template>
  <m-layout>
    <mt-header slot="header" title="销售管理" >
      <m-header-back slot="left"/>
    </mt-header>
    <div slot="body" class="sale">
      <m-section>
        <Index-Count :index-count='indexCount'/>
      </m-section>
      <mt-cell
        title="客户列表"
        to="/sale/customer-list"
        is-link
        value="">
      </mt-cell>
    </div>
    <div slot="bottom" >
      <router-link to='/sale/custom'>
        <mt-button type="primary" size="large">添加</mt-button>
      </router-link>
    </div>
  </m-layout>
</template>

<script>
import saleApi from 'api/sale.js'
import { mapState } from 'vuex'
import IndexCount from './components/IndexCount'

export default {
  components: {
    IndexCount
  },
  computed: {
    ...mapState({
      list: state => state.tactical.list
    })
  },
  data () {
    return {
      value: '',
      indexCount: ''
    }
  },
  mounted () {
    saleApi.saleDataStatistics({}).then((res) => {
      this.indexCount = res.data
    })
  }
}
</script>

<style lang="scss">
.sale{
}
</style>
